package com.guohu.service;

import com.bean.WmsTBillDetails;
import com.bean.WmsTCustomer;
import com.bean.WmsTTransfer;
import com.guohu.mapper.GuoHuMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class GuoHuService {
    @Autowired
    GuoHuMapper guoHuMapper;

    //卖家
    public List<WmsTCustomer> selSeller(){
        return guoHuMapper.selSeller();
    }
    //买家
    public List<WmsTCustomer> selBuyer(){
        return guoHuMapper.selBuyer();
    }
    //查询卖家下的所有东西
    public List<WmsTBillDetails> selDetails(String maijia){
        return  guoHuMapper.selDetails(maijia);
    }
    //查询货物id下的所有信息
    public WmsTBillDetails selDetailID(String detailsid){
        return guoHuMapper.selDetailID(detailsid);
    }
    //插入表wms_t_transfer
    public void inTransfer(String transferID,String userID,String transferVender, String transferBuyer,String transferDate,String transferCode){
        guoHuMapper.inTransfer(transferID,userID,transferVender,transferBuyer,transferDate,transferCode);
    }
    //插入表wms_t_trans_details
    public void inTranDeta(String tdetailsID,String transferID,String detailsID,String tdetailsGoodsNum,String transferDate){
        guoHuMapper.inTranDeta(tdetailsID,transferID,detailsID,tdetailsGoodsNum,transferDate);
    }
    //插入卖家进wms_t_bill
    public void inbillMaij(String billID,String userID,String maijiaID,String transferDate,String transferCode) {
        guoHuMapper.inbillMaij(billID,userID,maijiaID,transferDate,transferCode);
    }
    //插入买家wms_t_bill
    public void inbillmj(String biID,String userID,String mj,String transferDate,String transferCode,String kucun,String qita,String yingshou,String fufei) {
        guoHuMapper.inbillMj(biID,userID,mj,transferDate,transferCode,kucun,qita,yingshou,fufei);
    }
    //动态查询
    public List<WmsTTransfer> selTransFer(String transferBuyer, String transferVender,String date1, String date2){
        return guoHuMapper.selTransFer(transferBuyer,transferVender,date1,date2);
    }
}
